Contents | Index | < Browse | Browse >
LETTERferrorULETTER
Check for errors associated with the file.
Overview
#include <stdio.h>
r = ferror(fp);
int r; // result
FILE *fp; // file pointer
Portability
ANSI
Description
This function checks if any error occured while operating on the file pointed
to by "fp". It returns the error code, if an error occured, and 0 otherwise.
Returns
If no error has occured yet, zero is returned, a value unequal 0 otherwise.
See also
clearerr , feof , fopen , gets , perror